// 告诉gulp工具，你应该做哪些事情（如：压缩，合并，sass的编译等等）；
const gulp = require("gulp");
const sass = require("gulp-sass");

let basePath = "D:\\phpStudy\\WWW\\taobao2106"

gulp.task("watchall",async ()=>{
    
    gulp.watch("*.html",async()=>{
        gulp.src("*.html")
        .pipe(gulp.dest(basePath));
    });

    gulp.watch("img/*.(png,jpg)",async()=>{
        gulp.src("img/*.(png,jpg)")
        .pipe(gulp.dest(basePath+"\\img"));
    });

    gulp.watch("./sass/*.scss",async ()=>{
        gulp.src("./sass/*.scss")
        .pipe(sass())
        .pipe(gulp.dest(basePath+"\\css"));
    })

});

